package com.ruoyi.web.controller.system;

import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.system.domain.vo.SysWhitePaperChapterVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.service.ISysWhitePaperChapterService;

/**
 * 白皮书章节Controller
 *
 * @author ruoyi
 * @date 2025-10-20
 */
@RestController
@RequestMapping("/system/chapter")
public class SysWhitePaperChapterController extends BaseController
{
    @Autowired
    private ISysWhitePaperChapterService sysWhitePaperChapterService;

    /**
     * 新增白皮书章节
     */
    @Log(title = "白皮书章节", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody SysWhitePaperChapterVo whitePaperChapterVo)
    {
        sysWhitePaperChapterService.insertSysWhitePaperChapter(whitePaperChapterVo.getWhitePaperChapterList());
        return success();
    }
}
